const { Menu } = require('electron')
const file_item = require('./items/file_item')
const process_item = require('./items/process_item')

module.exports = mainWindow => {
  const template = [
    file_item(mainWindow),
    process_item(mainWindow),
    {
      label: '保存',
      submenu: [{ label: '保存文件' }],
    },
  ]

  const menu = Menu.buildFromTemplate(template) // build 之后才可以使用
  Menu.setApplicationMenu(menu)
}
